$(function(){
    /**
     * 查询患者信息
     */
    function displayLess(pageNoStr, pageSizeStr) {
        /*执行ajax*/
        $.ajax({
            url: "../../patientSignsAnemia/findBy",
            data: {
                pageNoStr: pageNoStr,
                pageSizeStr: pageSizeStr,
            },
            type: "post",
            dataType: "json",
            success: function (map) {
                var htmlStr = "";
                var pisList = map.pisList;
                for (var i = 0; i < pisList.length; i++) {

                }
                //展示到页面上
                $("#page_less").html(htmlStr);
                /*页面插件-分页展示*/
                //计算总页数
                var totalPages = 1;
                if (map.countList % pageSizeStr == 0) {
                    totalPages = map.countList / pageSizeStr;
                } else {
                    totalPages = parseInt(map.countList / pageSizeStr) + 1;
                }
                $("#query_page_less").bs_pagination({
                    currentPage: pageNoStr,	//当前页码
                    rowsPerPage: pageSizeStr,	//每页显示条数
                    totalRows: map.countList,	//总条数
                    totalPages: totalPages,//总页数
                    visiblePageLinks: 5,	//最多显示的卡片数
                    showGoToPage: true,		//是否显示跳转到几页
                    showRowsPerPage: true,	//是否显示每页显示条数
                    showRowsInfo: true,		//是否显示记录条数
                    //用来监听页号切换的事件，event代表事件，pageobj代表页面信息
                    onChangePage: function (event, pageObj) {
                        displayLess(pageObj.currentPage, pageObj.rowsPerPage);
                        pageObjIndexLess = pageObj.currentPage;
                    }
                });
            },
            error: function () {
                location.href = '404.jsp'
            }
        });
    }

})